<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="initial-scale=1.0, width=device-height">
<title>短信平台-首页</title>
<link rel="stylesheet" href="/workflow/resource/src/layui/css/layui.css">
<script src="/workflow/resource/src/js/jquery-1.11.0.min.js"></script>
<script src="/workflow/resource/src/layui/layui.js"></script>
<script src="/workflow/resource/src/js/index.js"></script>
</head>

<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">蔡家短信平台管理后台</div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><img
					src="/workflow/resource/img/toux.jpg" class="layui-nav-img">管理员${sessionScope.user.name }</li>
				<li class="layui-nav-item"><a href="/workflow/userManager/exit">退出</a></li>
			</ul>
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<%@ include file="menu.jsp"%>
				</ul>
			</div>
		</div>
		<!--框架头部-->
		<div class="layui-body">

			<div style="padding: 15px;">
				<div class="layui-form">
					<div class="layui-form-item">
						<a class="layui-btn" id="addbut"><i class="layui-icon">&#xe608;</i>添加</a>
						<button id="exportExcel" class="layui-btn">导出EXCEL</button>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-inline ">
							<input type="text" name="createdatei" id="startDate"
								placeholder="请选择开始时间" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline ">
							<input type="text" name="createdatei" id="endDate"
								placeholder="请选择结束时间" autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline ">
							<select id="unitidc">
							<option value="">办理部门</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-inline ">
							<select id="typeid">
								<option value="">类型</option>
								<option value="1">代办</option>
								<option value="2">代收</option>
								<option value="3">代发</option>
								<option value="4">一体化救助平台</option>
							</select>
						</div>
						<div class="layui-input-inline ">
							<select id="status" lay-verify="" lay-search>
								<option value="">状态</option>
								<option value="1">社区已交件</option>
								<option value="2">部门已接件</option>
								<option value="3">部门已办结</option>
								<option value="4">部门已返件</option>
								<option value="5">返件已完成</option>
								<option value="6">部门已退件</option>
								<option value="7">退件已完成</option>
								<option value="8">部门已交件</option>
								<option value="9">社区已接件</option>
							</select>
						</div>
						<div class="layui-input-inline ">
							<input id="bname" type="text" placeholder="姓名" autocomplete="off"
								class="layui-input">
						</div>
						<div class="layui-input-inline ">
							<input id="bphone" type="text" placeholder="电话"
								autocomplete="off" class="layui-input">
						</div>
						<div class="layui-input-inline ">
							<input id="Tname" type="text" placeholder="事项名"
								autocomplete="off" class="layui-input">
						</div>
						<button id="searchB" class="layui-btn">搜索</button>
					</div>
				</div>
				<!-- 内容主体区域 star-->
				<table class="layui-hide" id="test" lay-filter="demo"></table>
				<script type="text/html" id="barDemo">
                        {{#  if(d.status!=3&&d.status!=5&&d.status!=7&&d.status!=9&&!(d.status==2&&d.typeid==2)){ }}
    <a class="layui-btn layui-btn-xs" lay-event="edit">下一步</a>
  {{#  } }}
                         
                        <a class="layui-btn layui-btn-xs" lay-event="history">查看历史</a>
                         {{#  if(d.typeid!=2&&d.typeid!=3){ }}
<a class="layui-btn layui-btn-xs" lay-event="node">发送短信</a>
                        <a class="layui-btn layui-btn-xs" lay-event="receive">回复记录</a>
  {{#  } }}  
						<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
				</script>
				<!-- 内容主体区域 end-->
			</div>
		</div>
		<!--框架底部-->
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© 蔡家短信平台管理后台
		</div>
	</div>
	<!--弹出层 添加表单-->

	<form id="formI" class="layui-form layui-hide" method="post">
		<br>
		<div class="layui-form-item">
			<label class="layui-form-label">办理类型</label>
			<div class="layui-input-inline ">
				<select lay-filter="typeidNext" id="typeidNext" name="typeid">
					<option value="1">代办</option>
					<option value="2">代收</option>
					<option value="3">代发</option>
					<option value="4">一体化救助平台</option>
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">交件时间</label>
			<div class="layui-input-inline">
				<input type="text" name="createdatei" id="date"
					lay-verify="datetime|required" placeholder="请选择交件时间"
					autocomplete="off" class="layui-input">
			</div>
		</div>
		<div id="binfor" class="layui-form-item">
			<label class="layui-form-label">姓名</label>
			<div class="layui-input-inline">
				<input id="qunName" type="text" name="bname" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">联系电话</label>
			<div class="layui-input-inline">
				<input id="qunPhone" type="text" name="bphone"
					lay-verify="required|phone" placeholder="请输入" autocomplete="off"
					class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">事项名称</label>
			<div class="layui-input-inline">
				<input type="text" name="name" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">数量</label>
			<div class="layui-input-inline">
				<input type="number" name="number" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label id="sendunitlabel" class="layui-form-label">交件社区</label>
			<div class="layui-input-inline">
				<select id="unita" name="unitida">

				</select>
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="deleunit1" type="button"
					class="layui-btn layui-btn-danger">
					<i class="layui-icon">&#xe640;</i>
				</button>
			</div>
			<div class="layui-input-inline">
				<input type="text" id="unitname1" placeholder="新的部门"
					autocomplete="off" class="layui-input">
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="addunit1" type="button" class="layui-btn">
					<i class="layui-icon">&#xe654;</i>
				</button>
			</div>
		</div>
		<div id="dealunit" class="layui-form-item">
			<label id="dealunitlable" class="layui-form-label">办理部门</label>
			<div class="layui-input-inline">
				<select id="unitb2" name="unitidc">

				</select>
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="deleunit2s" type="button"
					class="layui-btn layui-btn-danger">
					<i class="layui-icon">&#xe640;</i>
				</button>
			</div>
			<div class="layui-input-inline">
				<input type="text" id="unitname2s" placeholder="新的部门"
					autocomplete="off" class="layui-input">
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="addunit2s" type="button" class="layui-btn">
					<i class="layui-icon">&#xe654;</i>
				</button>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">中转部门</label>
			<div class="layui-input-inline">
				<select id="unitb" name="unitidb">

				</select>
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="deleunit2" type="button"
					class="layui-btn layui-btn-danger">
					<i class="layui-icon">&#xe640;</i>
				</button>
			</div>
			<div class="layui-input-inline">
				<input type="text" id="unitname2" placeholder="新的部门"
					autocomplete="off" class="layui-input">
			</div>
			<div class="layui-input-inline"
				style="width: 110px; margin-right: 0px">
				<button id="addunit2" type="button" class="layui-btn">
					<i class="layui-icon">&#xe654;</i>
				</button>
			</div>
		</div>
		<!-- <div class="layui-form-item">
			<label class="layui-form-label">交件人</label>
			<div class="layui-input-inline">
				<input type="text" name="sendname" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>

		</div> -->
		<!-- <div class="layui-form-item">
			<label class="layui-form-label">接件人</label>
			<div class="layui-input-inline">
				<input type="text" name="acceptname" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>
		</div> -->
		<div class="layui-form-item">
			<div class="layui-input-block">
				<!-- <button id="butSubmit3" lay-submit lay-filter="direct"
					class="layui-btn">确认</button> -->
				<button lay-submit lay-filter="sign1"
					class="layui-btn layui-btn-info" type="button" id="sign1">确认并签字</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
		<input type="hidden" name="userid" value="${user.userid}">
	</form>
	<!-- 弹出层2 -->
	<form id="formI2" class="layui-form layui-hide" method="post">
		<br>
		<div class="layui-form-item">
			<label class="layui-form-label">下一步状态</label>
			<div class="layui-input-inline ">
				<select id="statusNext" lay-filter="statusNext" name="status">
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label id="sendplabledate" class="layui-form-label">中转时间</label>
			<div class="layui-input-inline">
				<input type="text" name="createdate" id="date2"
					lay-verify="datetime|required" placeholder="请选择中转时间"
					autocomplete="off" class="layui-input">
			</div>
		</div>

		<div vs id="reasond" class="layui-form-item">
			<label class="layui-form-label">退件理由</label>
			<div class="layui-input-inline">
				<input id="reasondinput" type="text" name="reason"
					lay-verify="required" placeholder="请输入" autocomplete="off"
					class="layui-input">
			</div>
		</div>
		<div vs id="dealtime" class="layui-form-item">
			<label id="dealtimelabel" class="layui-form-label">办理时限(工作日)</label>
			<div class="layui-input-inline">
				<input type="number" name="time" id='date3' lay-verify="required"
					placeholder="请选择办理时限" autocomplete="off" class="layui-input">
			</div>
		</div>
		<!-- <div vs id="sendp" class="layui-form-item">
			<label id="sendplable" class="layui-form-label">中转部门交件人</label>
			<div class="layui-input-inline">
				<input id="sendpinput" type="text" name="sendname"
					lay-verify="required" placeholder="请输入" autocomplete="off"
					class="layui-input">
			</div>

		</div> -->
		<div id='banjie' class="layui-form-item">
			<label id="accpetplabel" class="layui-form-label">办结人</label>
			<div class="layui-input-inline">
				<input type="text" name="acceptname" lay-verify="required"
					placeholder="请输入" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button id="butSubmit4" style="display: none" lay-submit
					lay-filter="direct2" class="layui-btn">确认</button>
				<button lay-submit lay-filter="sign2" id="sign2" class="layui-btn"
					type="button">确认并签字</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
		<input type="hidden" name="userid" value="${user.userid}">
	</form>

	<form id="formI3" class="layui-form layui-hide" method="post">
		<br>
		<div vs class="layui-form-item">
			<label class="layui-form-label">手机号码</label>
			<div class="layui-input-inline">
				<input id="phone" type="text" name="phone" autocomplete="off"
					class="layui-input" readonly="readonly" />
			</div>
		</div>
		<div vs class="layui-form-item">
			<label id="dealunilable" class="layui-form-label">短信模板</label>
			<div class="layui-input-inline">
				<select name="modelId" lay-filter="modelNext">
					<c:forEach items="${model}" var="item">
						<option value="${item.id}" data-content="${item.content}">${item.name}</option>
					</c:forEach>
				</select>
			</div>
		</div>
		<div vs class="layui-form-item">
			<label class="layui-form-label">短信内容</label>
			<div class="layui-input-inline" style="width: 300px;">
				<textarea rows="10" cols="100" name="content" placeholder="请输入模板内容"
					autocomplete="off" class="layui-input" style="height: 100px;"
					id="content">${model[0].content}</textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button id="butSubmit5" lay-submit lay-filter="" class="layui-btn">发送</button>
			</div>
		</div>
		<input type="hidden" id="thingId" name="thingId" />
	</form>
</body>
</html>